---
id: 656627b47bd2d2a4afbc945d
title: Step 4
challengeType: 20
dashedName: step-4
---

# --description--

In the previous step, you got the mid point. You can use it to divide `array` into two and assign each part to new variables.

Use the slice syntax to extract the left half of `array` and assign it to a variable named `left_part`.


# --hints--

You should have a variable named `left_part` in your `merge_sort` function.

```js
({
  test: () => {
    const transformedCode = code.replace(/\r/g, "");
    const merge_sort = __helpers.python.getDef("\n" + transformedCode, "merge_sort");
    const { function_body } = merge_sort;

    assert.match(function_body, /left_part\s*(?!=)/m);
  }
})
```

You should assign `array[:middle_point]` to the `left_part` variable.

```js
({
  test: () => {
    const transformedCode = code.replace(/\r/g, "");
    const merge_sort = __helpers.python.getDef("\n" + transformedCode, "merge_sort");
    const { function_body } = merge_sort;

    assert.match(function_body, /left_part\s*=\s*array\s*\[\s*:\s*middle_point\s*\]/);
  }
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
def merge_sort(array):
    middle_point = len(array) // 2

--fcc-editable-region--
```
